package gpslmall

import (
	"github.com/astaxie/beego"
)

type CategoryQueryRsp struct {
	*BaseRsp
	Content	BuyerCategoryTree	`json:"content"`   //
}
type BuyerCategoryTree struct {
	OpenCategoryTree string  `json:"openCategoryTree"`	   // 
}

func CategoryQuery(shopKey,secrecode string)(payInfo *CategoryQueryRsp, err error){
	method := "buyer.categoryQuery"
	reqURL := "http://106.75.191.107/m.api"
	sdk := NewSDK(reqURL, shopKey, secrecode)
	rsp := new(CategoryQueryRsp)
	_, err = sdk.Request(method, nil, rsp)
	if err != nil {
		beego.Debug("Gpslmall CategoryQuery err:", err.Error())
		return
	}
	//if rsp.Retcode != "SUCCESS" {
	//   err = errors.New(rsp.Retmsg)
	//}
	return
}
